package org.graphics;

import org.rsbot.script.methods.MethodContext;
import org.rsbot.script.methods.Skills;
import org.util.MethodGather;

/**
 * Created by IntelliJ IDEA.
 * User: Tim
 * Date: 9/8/11
 * Time: 5:05 PM
 * To change this template use File | Settings | File Templates.
 */
public class Tracker {
    long start;
    int bSkills[] = new int[7];//attack,str,def,range,mage,hp,prayer
    int cSkills[] = new int[7];//attack,str,def,range,mage,hp,prayer
    MethodContext m;

    /**
     * @param methodGather Obtains all information to be tracked
     */
    public Tracker(MethodGather methodGather) {
        start = System.currentTimeMillis();
        m = methodGather.getMethodContext();
        bSkills[0] = m.skills.getCurrentExp(Skills.ATTACK);
        bSkills[1] = m.skills.getCurrentExp(Skills.STRENGTH);
        bSkills[2] = m.skills.getCurrentExp(Skills.DEFENSE);
        bSkills[3] = m.skills.getCurrentExp(Skills.RANGE);
        bSkills[4] = m.skills.getCurrentExp(Skills.MAGIC);
        bSkills[5] = m.skills.getCurrentExp(Skills.CONSTITUTION);
        bSkills[6] = m.skills.getCurrentExp(Skills.PRAYER);

    }

    /**
     * Updates skill exp
     */
    void updateSkills() {
        cSkills[0] = m.skills.getCurrentExp(Skills.ATTACK);
        cSkills[1] = m.skills.getCurrentExp(Skills.STRENGTH);
        cSkills[2] = m.skills.getCurrentExp(Skills.DEFENSE);
        cSkills[3] = m.skills.getCurrentExp(Skills.RANGE);
        cSkills[4] = m.skills.getCurrentExp(Skills.MAGIC);
        cSkills[5] = m.skills.getCurrentExp(Skills.CONSTITUTION);
        cSkills[6] = m.skills.getCurrentExp(Skills.PRAYER);
    }
}
